home *** CD-ROM | disk | FTP | other *** search
Wrap
/* ** $VER: Solarize 2.1, IE Arexx script ** Image Engineer Macro script ** by Simon Edwards ** 6/7/96 ** Modified by Patrik M Nydensten ** 24/1 1997 Stockholm/Sweden ** ** 18/1 FORM interface added. SBE ** ** Applies a solarize effect to the image. */ Options results signal on error /* Setup a place for errors to go */ if arg()==0 then exit 'FORM "Solarize" "Ok|Cancel"', ' RADIO,"Type","Standard|Pg standard|Pg inverse",0' if word(result,1)=0 then exit Type = word(result,2) 'NEGATIVE' arg(1) NegImage=RESULT select when Type = 0 then do 'MARK' arg(1) 'PRIMARY' 'MARK' NegImage 'SECONDARY' 'COMPOSITE' 0 0 'MAX' end when Type = 1 then do 'MARK' arg(1) 'SECONDARY' 'MARK' NegImage 'PRIMARY' 'COMPOSITE' 0 0 'DIFFERENCE' DiffImage = Result 'NEGATIVE' DiffImage 'CLOSE' DiffImage end when Type = 2 then do 'MARK' arg(1) 'SECONDARY' 'MARK' NegImage 'PRIMARY' 'COMPOSITE' 0 0 'DIFFERENCE' end otherwise exit end /* select */ 'CLOSE' NegImage exit /*******************************************************************/ /* This is where control goes when an error code is returned by IE */ /* It puts up a message saying what happened and on which line */ /*******************************************************************/ error: if RC=5 then do /* Did the user just cancel us? */ IE_TO_FRONT LAST_ERROR 'REQUEST "'||RESULT||'"' exit end else do IE_TO_FRONT LAST_ERROR 'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!' exit end